package com.uraurora.crescent.function.monad;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.Date;

import static com.uraurora.crescent.util.Options.listOf;


/**
 * @author : gaoxiaodong04
 * @program : crescent
 * @date : 2020-10-14 11:23
 * @description :
 */
public class Kind<F, A> implements IKind<F, A> {

    protected final F f;

    protected A a;

    protected Kind(F f, A a) {
        this.f = f;
        this.a = a;
    }

    public static <F, A> Kind<F, A> of(F f, A a){
        return new Kind<>(f, a);
    }

    @Override
    public F getF() {
        return f;
    }

    @Override
    public A getA() {
        return a;
    }

    @Override
    public void setA(A a) {
        this.a = a;
    }

    public static void main(String[] args) throws UnsupportedEncodingException {
        System.out.println(new Date());

        final String decode = URLDecoder.decode("imeituan://www.meituan.com/web?url=http://test-g.meituan.com/app/app-business-coupon-page/index.html?launchId=123&shopId=13&shopuuid=Strz&notitlebar=1", "UTF-8");
        System.out.println(decode);
    }
}
